// @ts-ignore
/* eslint-disable */
import request from '@/utils/request'

/** pageMessage 分页查询消息 POST /api/message/page */
export async function pageMessageUsingPost(
  body: API.MessageQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponsePageMessageVo_>('/api/message/page', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** read 标记消息为已读 POST /api/message/read */
export async function readUsingPost(
  body: API.MessageReadRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>('/api/message/read', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** unreadCount 查询未读消息数量 GET /api/message/unreadCount */
export async function unreadCountUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.UnreadCountUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseInt_>('/api/message/unreadCount', {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}
